from typing import Any

from rapidocr_onnxruntime import RapidOCR

engine = RapidOCR()


async def execute_ocr(img_path: str) -> list[list[str | Any]] | None:
    result, _ = engine(img_path)
    return result
